Optimal. Leaf size=275 \[ -\frac {2 B (b c-a d) g^2 n (a+b x)}{d^2 i^2 (c+d x)}+\frac {(b c-a d) g^2 (2 A+B n) (a+b x)}{d^2 i^2 (c+d x)}+\frac {2 B (b c-a d) g^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d^2 i^2 (c+d x)}+\frac {g^2 (a+b x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{d i^2 (c+d x)}+\frac {b (b c-a d) g^2 \left (2 A+B n+2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (\frac {b c-a d}{b (c+d x)}\right )}{d^3 i^2}+\frac {2 b B (b c-a d) g^2 n \text {Li}_2\left (\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 i^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.21, antiderivative size = 275, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {2561, 2384, 45,
2393, 2332, 2354, 2438} \begin {gather*} \frac {2 b B g^2 n (b c-a d) \text {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^3 i^2}+\frac {b g^2 (b c-a d) \log \left (\frac {b c-a d}{b (c+d x)}\right ) \left (2 B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+2 A+B n\right )}{d^3 i^2}+\frac {g^2 (a+b x) (2 A+B n) (b c-a d)}{d^2 i^2 (c+d x)}+\frac {g^2 (a+b x)^2 \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d i^2 (c+d x)}+\frac {2 B g^2 (a+b x) (b c-a d) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d^2 i^2 (c+d x)}-\frac {2 B g^2 n (a+b x) (b c-a d)}{d^2 i^2 (c+d x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rule 2332
Rule 2354
Rule 2384
Rule 2393
Rule 2438
Rule 2561
Rubi steps
\begin {align*} \int \frac {(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{(144 c+144 d x)^2} \, dx &=\int \left (\frac {b^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{20736 d^2}+\frac {(-b c+a d)^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{20736 d^2 (c+d x)^2}-\frac {b (b c-a d) g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{10368 d^2 (c+d x)}\right ) \, dx\\ &=\frac {\left (b^2 g^2\right ) \int \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \, dx}{20736 d^2}-\frac {\left (b (b c-a d) g^2\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c+d x} \, dx}{10368 d^2}+\frac {\left ((b c-a d)^2 g^2\right ) \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(c+d x)^2} \, dx}{20736 d^2}\\ &=\frac {A b^2 g^2 x}{20736 d^2}-\frac {(b c-a d)^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{20736 d^3 (c+d x)}-\frac {b (b c-a d) g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{10368 d^3}+\frac {\left (b^2 B g^2\right ) \int \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right ) \, dx}{20736 d^2}+\frac {\left (b B (b c-a d) g^2 n\right ) \int \frac {(c+d x) \left (-\frac {d (a+b x)}{(c+d x)^2}+\frac {b}{c+d x}\right ) \log (c+d x)}{a+b x} \, dx}{10368 d^3}+\frac {\left (B (b c-a d)^2 g^2 n\right ) \int \frac {b c-a d}{(a+b x) (c+d x)^2} \, dx}{20736 d^3}\\ &=\frac {A b^2 g^2 x}{20736 d^2}+\frac {b B g^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{20736 d^2}-\frac {(b c-a d)^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{20736 d^3 (c+d x)}-\frac {b (b c-a d) g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{10368 d^3}+\frac {\left (b B (b c-a d) g^2 n\right ) \int \left (\frac {b \log (c+d x)}{a+b x}-\frac {d \log (c+d x)}{c+d x}\right ) \, dx}{10368 d^3}-\frac {\left (b B (b c-a d) g^2 n\right ) \int \frac {1}{c+d x} \, dx}{20736 d^2}+\frac {\left (B (b c-a d)^3 g^2 n\right ) \int \frac {1}{(a+b x) (c+d x)^2} \, dx}{20736 d^3}\\ &=\frac {A b^2 g^2 x}{20736 d^2}+\frac {b B g^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{20736 d^2}-\frac {(b c-a d)^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{20736 d^3 (c+d x)}-\frac {b B (b c-a d) g^2 n \log (c+d x)}{20736 d^3}-\frac {b (b c-a d) g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{10368 d^3}+\frac {\left (b^2 B (b c-a d) g^2 n\right ) \int \frac {\log (c+d x)}{a+b x} \, dx}{10368 d^3}-\frac {\left (b B (b c-a d) g^2 n\right ) \int \frac {\log (c+d x)}{c+d x} \, dx}{10368 d^2}+\frac {\left (B (b c-a d)^3 g^2 n\right ) \int \left (\frac {b^2}{(b c-a d)^2 (a+b x)}-\frac {d}{(b c-a d) (c+d x)^2}-\frac {b d}{(b c-a d)^2 (c+d x)}\right ) \, dx}{20736 d^3}\\ &=\frac {A b^2 g^2 x}{20736 d^2}+\frac {B (b c-a d)^2 g^2 n}{20736 d^3 (c+d x)}+\frac {b B (b c-a d) g^2 n \log (a+b x)}{20736 d^3}+\frac {b B g^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{20736 d^2}-\frac {(b c-a d)^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{20736 d^3 (c+d x)}-\frac {b B (b c-a d) g^2 n \log (c+d x)}{10368 d^3}+\frac {b B (b c-a d) g^2 n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{10368 d^3}-\frac {b (b c-a d) g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{10368 d^3}-\frac {\left (b B (b c-a d) g^2 n\right ) \text {Subst}\left (\int \frac {\log (x)}{x} \, dx,x,c+d x\right )}{10368 d^3}-\frac {\left (b B (b c-a d) g^2 n\right ) \int \frac {\log \left (\frac {d (a+b x)}{-b c+a d}\right )}{c+d x} \, dx}{10368 d^2}\\ &=\frac {A b^2 g^2 x}{20736 d^2}+\frac {B (b c-a d)^2 g^2 n}{20736 d^3 (c+d x)}+\frac {b B (b c-a d) g^2 n \log (a+b x)}{20736 d^3}+\frac {b B g^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{20736 d^2}-\frac {(b c-a d)^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{20736 d^3 (c+d x)}-\frac {b B (b c-a d) g^2 n \log (c+d x)}{10368 d^3}+\frac {b B (b c-a d) g^2 n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{10368 d^3}-\frac {b (b c-a d) g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{10368 d^3}-\frac {b B (b c-a d) g^2 n \log ^2(c+d x)}{20736 d^3}-\frac {\left (b B (b c-a d) g^2 n\right ) \text {Subst}\left (\int \frac {\log \left (1+\frac {b x}{-b c+a d}\right )}{x} \, dx,x,c+d x\right )}{10368 d^3}\\ &=\frac {A b^2 g^2 x}{20736 d^2}+\frac {B (b c-a d)^2 g^2 n}{20736 d^3 (c+d x)}+\frac {b B (b c-a d) g^2 n \log (a+b x)}{20736 d^3}+\frac {b B g^2 (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{20736 d^2}-\frac {(b c-a d)^2 g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{20736 d^3 (c+d x)}-\frac {b B (b c-a d) g^2 n \log (c+d x)}{10368 d^3}+\frac {b B (b c-a d) g^2 n \log \left (-\frac {d (a+b x)}{b c-a d}\right ) \log (c+d x)}{10368 d^3}-\frac {b (b c-a d) g^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)}{10368 d^3}-\frac {b B (b c-a d) g^2 n \log ^2(c+d x)}{20736 d^3}+\frac {b B (b c-a d) g^2 n \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )}{10368 d^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.17, size = 252, normalized size = 0.92 \begin {gather*} \frac {g^2 \left (A b^2 d x+\frac {B (b c-a d)^2 n}{c+d x}+b B (b c-a d) n \log (a+b x)+b B d (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-\frac {(b c-a d)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c+d x}-2 b B (b c-a d) n \log (c+d x)-2 b (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)+b B (b c-a d) n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \text {Li}_2\left (\frac {b (c+d x)}{b c-a d}\right )\right )\right )}{d^3 i^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.20, size = 0, normalized size = 0.00 \[\int \frac {\left (b g x +a g \right )^{2} \left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}{\left (d i x +c i \right )^{2}}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 1163 vs.
\(2 (262) = 524\).
time = 0.55, size = 1163, normalized size = 4.23 \begin {gather*} -B a^{2} g^{2} n {\left (\frac {b \log \left (b x + a\right )}{b c d - a d^{2}} - \frac {b \log \left (d x + c\right )}{b c d - a d^{2}} + \frac {1}{d^{2} x + c d}\right )} + A b^{2} {\left (\frac {c^{2}}{d^{4} x + c d^{3}} - \frac {x}{d^{2}} + \frac {2 \, c \log \left (d x + c\right )}{d^{3}}\right )} g^{2} - 2 \, A a b g^{2} {\left (\frac {c}{d^{3} x + c d^{2}} + \frac {\log \left (d x + c\right )}{d^{2}}\right )} + \frac {B a^{2} g^{2} \log \left ({\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n} e\right )}{d^{2} x + c d} + \frac {A a^{2} g^{2}}{d^{2} x + c d} - \frac {{\left (a b^{2} c d g^{2} {\left (3 \, n + 4\right )} - 2 \, b^{3} c^{2} g^{2} {\left (n + 1\right )} - 2 \, a^{2} b d^{2} g^{2}\right )} B \log \left (d x + c\right )}{b c d^{3} - a d^{4}} - \frac {{\left (b^{3} c d^{2} g^{2} - a b^{2} d^{3} g^{2}\right )} B x^{2} + {\left (b^{3} c^{2} d g^{2} - a b^{2} c d^{2} g^{2}\right )} B x + 2 \, {\left ({\left (b^{3} c^{2} d g^{2} n - 2 \, a b^{2} c d^{2} g^{2} n + a^{2} b d^{3} g^{2} n\right )} B x + {\left (b^{3} c^{3} g^{2} n - 2 \, a b^{2} c^{2} d g^{2} n + a^{2} b c d^{2} g^{2} n\right )} B\right )} \log \left (b x + a\right ) \log \left (d x + c\right ) - {\left ({\left (b^{3} c^{2} d g^{2} n - 2 \, a b^{2} c d^{2} g^{2} n + a^{2} b d^{3} g^{2} n\right )} B x + {\left (b^{3} c^{3} g^{2} n - 2 \, a b^{2} c^{2} d g^{2} n + a^{2} b c d^{2} g^{2} n\right )} B\right )} \log \left (d x + c\right )^{2} + {\left (b^{3} c^{3} g^{2} {\left (n - 1\right )} - 3 \, a b^{2} c^{2} d g^{2} {\left (n - 1\right )} + 2 \, a^{2} b c d^{2} g^{2} {\left (n - 1\right )}\right )} B + {\left ({\left (b^{3} c^{2} d g^{2} n - a b^{2} c d^{2} g^{2} n - a^{2} b d^{3} g^{2} n\right )} B x + {\left (b^{3} c^{3} g^{2} n - a b^{2} c^{2} d g^{2} n - a^{2} b c d^{2} g^{2} n\right )} B\right )} \log \left (b x + a\right ) + {\left ({\left (b^{3} c d^{2} g^{2} - a b^{2} d^{3} g^{2}\right )} B x^{2} + {\left (b^{3} c^{2} d g^{2} - a b^{2} c d^{2} g^{2}\right )} B x - {\left (b^{3} c^{3} g^{2} - 3 \, a b^{2} c^{2} d g^{2} + 2 \, a^{2} b c d^{2} g^{2}\right )} B - 2 \, {\left ({\left (b^{3} c^{2} d g^{2} - 2 \, a b^{2} c d^{2} g^{2} + a^{2} b d^{3} g^{2}\right )} B x + {\left (b^{3} c^{3} g^{2} - 2 \, a b^{2} c^{2} d g^{2} + a^{2} b c d^{2} g^{2}\right )} B\right )} \log \left (d x + c\right )\right )} \log \left ({\left (b x + a\right )}^{n}\right ) - {\left ({\left (b^{3} c d^{2} g^{2} - a b^{2} d^{3} g^{2}\right )} B x^{2} + {\left (b^{3} c^{2} d g^{2} - a b^{2} c d^{2} g^{2}\right )} B x - {\left (b^{3} c^{3} g^{2} - 3 \, a b^{2} c^{2} d g^{2} + 2 \, a^{2} b c d^{2} g^{2}\right )} B - 2 \, {\left ({\left (b^{3} c^{2} d g^{2} - 2 \, a b^{2} c d^{2} g^{2} + a^{2} b d^{3} g^{2}\right )} B x + {\left (b^{3} c^{3} g^{2} - 2 \, a b^{2} c^{2} d g^{2} + a^{2} b c d^{2} g^{2}\right )} B\right )} \log \left (d x + c\right )\right )} \log \left ({\left (d x + c\right )}^{n}\right )}{b c^{2} d^{3} - a c d^{4} + {\left (b c d^{4} - a d^{5}\right )} x} + \frac {2 \, {\left (b^{2} c g^{2} n - a b d g^{2} n\right )} {\left (\log \left (b x + a\right ) \log \left (\frac {b d x + a d}{b c - a d} + 1\right ) + {\rm Li}_2\left (-\frac {b d x + a d}{b c - a d}\right )\right )} B}{d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 1838 vs.
\(2 (262) = 524\).
time = 196.84, size = 1838, normalized size = 6.68 \begin {gather*} \text {Too large to display} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {{\left (a\,g+b\,g\,x\right )}^2\,\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}{{\left (c\,i+d\,i\,x\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________